<?php

namespace app\models\dao;

use Yii;

/**
 * This is the model class for table "{{%operation_log}}".
 *
 * @property integer $id
 * @property string $manager_id
 * @property string $action
 * @property string $content
 * @property string $ip
 * @property string $url
 * @property string $create_time
 */
class OperationLog extends \app\common\PopToolActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%operation_log}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['manager_id', 'action', 'content'], 'required'],
            [['content'], 'string'],
            [['create_time'], 'safe'],
            [['manager_id', 'action'], 'string', 'max' => 50],
            [['ip'], 'string', 'max' => 80],
            [['url'], 'string', 'max' => 255],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'manager_id' => '管理员ID',
            'action' => '动作',
            'content' => '描述',
            'ip' => 'ip',
            'url' => '是否显示',
            'create_time' => '创建时间',
        ];
    }
}
